QT       += core gui
QT       += openglwidgets

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat

LIBS += -lOle32
LIBS += -ldinput8
LIBS += -lDXGuid

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    Audio/AudioOutput.cpp \
    GamePadInput/GamePadInput.cpp \
    H_Lib/H_Icon.c \
    H_Lib/H_String.c \
    H_Math/H_AudioResample.c \
    H_Math/H_AudioResample_Ext.c \
    H_NES/API/H_NES.c \
    H_NES/Cartridge/H_NES_Cartridge.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper0.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper1.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper2.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper21.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper22.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper3.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper4.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper65.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper7.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper74.c \
    H_NES/Cartridge/Mapper/H_NES_Mapper85.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper0_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper1_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper21_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper22_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper23_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper25_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper2_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper3_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper4_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper65_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper74_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper7_Ext.c \
    H_NES/Cartridge/Mapper_Ext/H_NES_Mapper85_Ext.c \
    H_NES/Console/H_NES_APU.c \
    H_NES/Console/H_NES_APU_Ext.c \
    H_NES/Console/H_NES_CPU.c \
    H_NES/Console/H_NES_Console.c \
    H_NES/Console/H_NES_Console_Ext.c \
    H_NES/Console/H_NES_IO.c \
    H_NES/Console/H_NES_PPU.c \
    H_NES/Console/H_NES_PPU_Ext.c \
    H_NES/ConstString/H_NES_ConstString.c \
    H_NES_CPP.cpp \
    H_Printf.c \
    NES.cpp \
    NESDisplayGL.cpp \
    NES_InputMapper.cpp \
    NES_Palette.cpp \
    NVM/NVM.cpp \
    Stream/ByteStream.cpp \
    audiosettingsdialog.cpp \
    inputsettingsdialog.cpp \
    logdialog.cpp \
    main.cpp \
    mainwindow.cpp \
    videosettingsdialog.cpp

HEADERS += \
    Audio/AudioOutput.h \
    GamePadInput/GamePadInput.h \
    H_Lib/H_Icon.h \
    H_Lib/H_String.h \
    H_Lib/H_Type.h \
    H_Math/H_AudioResample.h \
    H_NES/API/H_NES_Config.h \
    H_NES/Cartridge/H_NES_Cartridge.h \
    H_NES/Cartridge/H_NES_Mapper.h \
    H_NES/Console/H_NES_APU.h \
    H_NES/Console/H_NES_CPU.h \
    H_NES/Console/H_NES_Console.h \
    H_NES/Console/H_NES_PPU.h \
    H_NES/ConstString/H_NES_ConstString.h \
    H_NES/H_NES.h \
    H_NES/LL/H_NES_UserConfig.h \
    H_NES_CPP.h \
    H_Printf.h \
    NES.h \
    NESDisplayGL.h \
    NES_InputMapper.h \
    NES_Palette.h \
    NVM/NVM.h \
    Stream/ByteStream.h \
    Stream/ObjectQueue.hpp \
    audiosettingsdialog.h \
    inputsettingsdialog.h \
    logdialog.h \
    mainwindow.h \
    videosettingsdialog.h

FORMS += \
    audiosettingsdialog.ui \
    inputsettingsdialog.ui \
    logdialog.ui \
    mainwindow.ui \
    videosettingsdialog.ui

TRANSLATIONS += \
    H_NES_zh_CN.ts
CONFIG += lrelease
CONFIG += embed_translations

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
  res.qrc

INCLUDEPATH += \
  Stream/ \
  Audio/ \
  GamePadInput/ \
  NVM/ \
  H_Lib/ \
  H_Math/ \
  H_NES/

RC_ICONS = image/HYC.0x9DEFA478.LOGO_TB.ico
